package com.mnyc.research.service.impl;

import java.util.List;
import com.mnyc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mnyc.research.mapper.JyTeacherMapper;
import com.mnyc.research.domain.JyTeacher;
import com.mnyc.research.service.IJyTeacherService;

/**
 * 教师信息Service业务层处理
 * 
 * @author wdy
 * @date 2025-08-04
 */
@Service
public class JyTeacherServiceImpl implements IJyTeacherService 
{
    @Autowired
    private JyTeacherMapper jyTeacherMapper;

    /**
     * 查询教师信息
     * 
     * @param id 教师信息主键
     * @return 教师信息
     */
    @Override
    public JyTeacher selectJyTeacherById(Long id)
    {
        return jyTeacherMapper.selectJyTeacherById(id);
    }

    /**
     * 查询教师信息列表
     * 
     * @param jyTeacher 教师信息
     * @return 教师信息
     */
    @Override
    public List<JyTeacher> selectJyTeacherList(JyTeacher jyTeacher)
    {
        return jyTeacherMapper.selectJyTeacherList(jyTeacher);
    }

    /**
     * 新增教师信息
     * 
     * @param jyTeacher 教师信息
     * @return 结果
     */
    @Override
    public int insertJyTeacher(JyTeacher jyTeacher)
    {
        jyTeacher.setCreateTime(DateUtils.getNowDate());
        return jyTeacherMapper.insertJyTeacher(jyTeacher);
    }

    /**
     * 修改教师信息
     * 
     * @param jyTeacher 教师信息
     * @return 结果
     */
    @Override
    public int updateJyTeacher(JyTeacher jyTeacher)
    {
        jyTeacher.setUpdateTime(DateUtils.getNowDate());
        return jyTeacherMapper.updateJyTeacher(jyTeacher);
    }

    /**
     * 批量删除教师信息
     * 
     * @param ids 需要删除的教师信息主键
     * @return 结果
     */
    @Override
    public int deleteJyTeacherByIds(Long[] ids)
    {
        return jyTeacherMapper.deleteJyTeacherByIds(ids);
    }

    /**
     * 删除教师信息信息
     * 
     * @param id 教师信息主键
     * @return 结果
     */
    @Override
    public int deleteJyTeacherById(Long id)
    {
        return jyTeacherMapper.deleteJyTeacherById(id);
    }
}
